package com.girl.exception;

import com.girl.enums.ResultEnum;

/**
 * Created by zzy on 2017/12/10.
 */
public class GrilExecption extends  RuntimeException {//只有抛出runtimeException才进行回滚

    private Integer code;

    public GrilExecption(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
